import { MyConsoleComponent } from './page-layout/my-console/my-console.component';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ErrorAuthorizedComponent } from './page-layout/error-page/error-authorized/error-authorized.component';

const routes: Routes = [
  {path: '', redirectTo: 'login', pathMatch: 'full'},
  {path: 'pages', redirectTo: 'pages', pathMatch: 'full'},
  {path: 'login', loadChildren: () => import('./login/login.module').then(m => m.LoginModule)},
  {path: 'pages', loadChildren: () => import('./page-layout/page-layout.module').then(m => m.PageLayoutModule)},
  // { path: '**', component: ErrorAuthorizedComponent}, // 错误页面

];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
